<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="./resources/css/default.css" rel="stylesheet" type="text/css" />
        <link href="./resources/css/cssLayout.css" rel="stylesheet" type="text/css" />
        <title>Locadora de Videos</title>
    </h:head>
    <h:body>
        <div id="top">
            <ui:insert name="menu">
                <ui:include src="Cabecalho.xhtml"></ui:include>
            </ui:insert>
        </div>
        <h:outputText id="bemVindoo" value="Bem Vindo ao Sistema (usuario): #{usuarioHandler.usuario.usuario}" />
        <div>
            <div id="left">
                <ui:insert name="left">   
                    <ui:include src="Menu.xhtml"></ui:include>
                </ui:insert>
            </div>
            <div>
                <div id="right">
                    <ui:insert name="right">   
                        <ui:include src="Menu2.xhtml"></ui:include>
                    </ui:insert>
                </div>
                <div id="content" class="right_content">
                    <ui:insert name="content">
                        <ui:include src="Homei.xhtml"></ui:include>
                    </ui:insert>
                </div>
            </div>
        </div>
        <div id="bottom" style="text-align: center; position: fixed; z-index: 1000; bottom: 10px; width: 98%;">
            <ui:insert name="bottom">
                <ui:include src="Rodape.xhtml"></ui:include>
            </ui:insert>
        </div>
        <p:idleMonitor id="idlMoni" onidle="sessaoExpirada.show()" timeout="900000"/>
        <p:dialog header="Logout" widgetVar="sessaoExpirada" width="200" height="250" closable="false" modal="true">
            <h:panelGrid style="margin: 0 auto" columns="1">
                <p:spacer height="15"/>
                <p:graphicImage value="resources/expirada.png" style="width:170px; height:90px;"/>
                <p:spacer height="20"/>
                <h:form style="text-align: center">
                    <p:commandButton id="btLogout" value="Logout" action="{loginHandler.logout()}" onclick="Login.xhtml" ajax="false"/>  
                </h:form>
            </h:panelGrid>
        </p:dialog>
    </h:body>
</html>
